<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title></title>
	<link rel="stylesheet" href="./themes/iframe.css" type="text/css">
</head>
<body>
	<form action="" method="post">
		<textarea name="content" id="myEditor" style="width:1000px;height:1000px;"></textarea>
	</form>
	<button type="button" id="submit">提交</button>
	<!-- 加载编辑器的容器 -->
	<script id="container" name="content" type="text/plain">这里写你的初始化内容</script>
	<!-- 配置文件 -->
	<script type="text/javascript" src="./jquery-3.3.1.min.js"></script>

	<script type="text/javascript" src="./ueditor.config.js"></script>
	<!-- 编辑器源码文件 -->
	<script type="text/javascript" src="./ueditor.all.js"></script>
	<!-- 2.通过引用ckeditor,实现完整保留从Excel粘贴过来的格式 -->
    <script src='./ckeditor.min.office.js'></script>
	<!-- 实例化编辑器 -->
	<script type="text/javascript">
		var ue = UE.getEditor('myEditor');
		//实时监听工具栏上面的副标题按钮的状态
		ue.addListener('selectionchange', function () {
			var state = ue.queryCommandState('blockquote');
			var _e = $("#edui18_state");

			if (state) {
				_e.addClass("edui-state-checked");
			} else {
				_e.removeClass("edui-state-checked");
			}
		});
		//实时监听工具栏上面的引用段落按钮的状态
		ue.addListener('selectionchange', function () {
			var state = ue.queryCommandState('blockquote');
			var _e = $("#edui19_state");

			if (state) {
				_e.addClass("edui-state-checked");
			} else {
				_e.removeClass("edui-state-checked");
			}
		});

		var btn = document.getElementById("submit");
		btn.addEventListener('click', function () {
			if (!UE.getEditor('myEditor').hasContents()) {
				alert('请先填写内容!');
			} else {
				var innerEditor = UE.getEditor('myEditor').getContent();
			}
		})
		
    
	</script>
</body>

</html>